home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 2
/
Atari Mega Archive CD - Volume 2.iso
/
minix
/
up1510b.tgz
/
up1510b
/
src
/
fs
/
protect.c.D
< prev
next >
Wrap
Text File
|
1990-07-25
|
4KB
|
132 lines
*** /tmp/,RCSt1022244 Wed Jul 25 13:48:59 1990
--- protect.c Mon Jul 23 11:34:24 1990
***************
*** 10,22 ****
*/
! #include "../h/const.h"
! #include "../h/type.h"
! #include "../h/error.h"
! #include "const.h"
! #include "type.h"
#include "buf.h"
#include "file.h"
#include "fproc.h"
- #include "glo.h"
#include "inode.h"
#include "param.h"
--- 10,17 ----
*/
! #include "fs.h"
#include "buf.h"
#include "file.h"
#include "fproc.h"
#include "inode.h"
#include "param.h"
***************
*** 32,36 ****
register struct inode *rip;
register int r;
- extern struct inode *eat_path();
/* Temporarily open the file. */
--- 27,30 ----
***************
*** 70,74 ****
register struct inode *rip;
register int r;
- extern struct inode *eat_path();
/* Only the super_user may perform the chown() call. */
--- 64,67 ----
***************
*** 98,102 ****
{
/* Perform the umask(co_mode) system call. */
! register mask_bits r;
r = ~fp->fp_umask; /* set 'r' to complement of old mask */
--- 91,95 ----
{
/* Perform the umask(co_mode) system call. */
! register mode_t r;
r = ~fp->fp_umask; /* set 'r' to complement of old mask */
***************
*** 115,119 ****
struct inode *rip;
register int r;
- extern struct inode *eat_path();
/* Temporarily open the file whose access is to be checked. */
--- 108,111 ----
***************
*** 122,126 ****
/* Now check the permissions. */
! r = forbidden(rip, (mask_bits) mode, 1);
put_inode(rip);
return(r);
--- 114,118 ----
/* Now check the permissions. */
! r = forbidden(rip, (mode_t) mode, 1);
put_inode(rip);
return(r);
***************
*** 133,137 ****
PUBLIC int forbidden(rip, access_desired, real_uid)
register struct inode *rip; /* pointer to inode to be checked */
! mask_bits access_desired; /* RWX bits */
int real_uid; /* set iff real uid to be tested */
{
--- 125,129 ----
PUBLIC int forbidden(rip, access_desired, real_uid)
register struct inode *rip; /* pointer to inode to be checked */
! mode_t access_desired; /* RWX bits */
int real_uid; /* set iff real uid to be tested */
{
***************
*** 138,146 ****
/* Given a pointer to an inode, 'rip', and the access desired, determine
* if the access is allowed, and if not why not. The routine looks up the
! * caller's uid in the 'fproc' table. If the access is allowed, OK is returned
* if it is forbidden, EACCES is returned.
*/
! register mask_bits bits, perm_bits, xmask;
int r, shift, test_uid, test_gid;
--- 130,138 ----
/* Given a pointer to an inode, 'rip', and the access desired, determine
* if the access is allowed, and if not why not. The routine looks up the
! * caller's uid in the 'fproc' table. If access is allowed, OK is returned
* if it is forbidden, EACCES is returned.
*/
! register mode_t bits, perm_bits, xmask;
int r, shift, test_uid, test_gid;
***************
*** 179,183 ****
* read_only *
*===========================================================================*/
! PRIVATE int read_only(ip)
struct inode *ip; /* ptr to inode whose file sys is to be cked */
{
--- 171,175 ----
* read_only *
*===========================================================================*/
! PUBLIC int read_only(ip)
struct inode *ip; /* ptr to inode whose file sys is to be cked */
{
***************
*** 187,191 ****
register struct super_block *sp;
- extern struct super_block *get_super();
sp = get_super(ip->i_dev);
--- 179,182 ----